package com.kktestspb.demo.controller;

import com.kktestspb.demo.polo.Product;
import com.kktestspb.demo.services.PCServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * java爬虫Controller
 * add by 20190208 使用jsoup框架
 *
 */
@RestController
public class PcController {

    @Autowired
    PCServices pcServices;
    @Autowired
    Product product;


    @RequestMapping("/gettmallosmtopten")
    public List<Product> getTmallOsmTopTen(){
        return pcServices.getTopTen();

    }
    @RequestMapping("/gettmallosmsellinfo")
    public List<Product> getTmallOsm(){
        return pcServices.getTmallOsmInfo();

    }
}
